// dllmain.cpp : Implementation of DllMain.

#include "stdafx.h"
#include "resource.h"
#include "EncryptIt_i.h"
#include "dllmain.h"
#include "dlldatax.h"
#include "Addin.h"

CEncryptItModule _AtlModule;

// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
	if(!CAddin::DLLPATH.compare(_T("0"))){
	WCHAR path[1000];
	DWORD chrCount = GetModuleFileName(hInstance, path, 1000);
	CAddin::DLLPATH = path;
	CAddin::DLLPATH.erase(CAddin::DLLPATH.find_last_of(L"\\")+1);
	}

#ifdef _MERGE_PROXYSTUB
	if (!PrxDllMain(hInstance, dwReason, lpReserved))
		return FALSE;
#endif
	hInstance;
	return _AtlModule.DllMain(dwReason, lpReserved);
}
